/*
 *  SKString.h
 *  libsoko
 *
 *  Created by WenBi on 11-6-14.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

#include <string>

class SKString : public std::wstring {
	
public:
	
	/**
	 * Initializes a newly created <code>SKString</code> object so that	
	 * it represents an empty character sequence.
	 */
	SKString();
	
	/**
	 * Constructs a new string by decoding the specified subarray of bytes using the platform's default charset.
	 * 
	 * @param bytes The bytes to be decoded to characters
	 * @param offset The index of the first byte to decode
	 * @param length The number of bytes to decode
	 *
	 */
	SKString(const char *bytes, int offset, int length, int encoding);
	
	/**
	 * Allocates a new <code>SKString</code> that contains characters from a subarray of 
	 * the character array argument.
	 * 
	 * @param chars array that is a source of characters.
	 */
	SKString(const wchar_t *chars);
	
	/**
	 * Allocates a new <code>SKString</code> that contains characters from a subarray of 
	 * the character array argument.
	 * 
	 * @param chars array that is a source of characters.
	 * @param offset the initail offset
	 * @count the length
	 */
	SKString(const wchar_t *chars, int offset, int count);
	
	/**
	 * Returns the length of this string.
	 *
	 * @return Length of the sequence of characters represented by this object.
	 */
	int length() const;
	
	/**
	 * Returns the character at the specified index.
	 * An index ranges from 0 to length() - 1.
	 *
	 * @param index The index of the character
	 * @return The character of the specified index of this string.
	 */
	wchar_t charAt(int index) const;
	
	const wchar_t * CString() const;
	
};
